//
//  YMBook.swift
//  YMSwiftUI
//
//  Created by anscen on 2022/3/18.
//

import UIKit
import HandyJSON

struct YMBook: HandyJSON,Hashable {
    var bookId    :String?       = "";
    var updated   :String        = ""
    var author    :String? = "";
    var cover     :String? = "";
    var shortIntro:String? = ""
    var title     :String? = "";
    var majorCate :String  = ""
    var minorCate :String = "";
    var lastChapter:String? = "";
    var tags       :[String] = []
    var retentionRatio :Float? = 0.0;
    var latelyFollower :Int?   = 0;
    mutating func mapping(mapper: HelpingMapper) {
        mapper <<< self.bookId     <-- ["bookId","_id"]
        mapper <<< self.shortIntro <-- ["shortIntro","longIntro"]
    }
}
